package com.qingcloud.df.executor.utils;

import com.google.common.base.Preconditions;

import java.util.HashMap;
import java.util.Map;

public class MoreMaps {

    public static <K, V> Map<K, V> merge(final Map<K, V>... maps) {
        final Map<K, V> outputMap = new HashMap<>();

        for (final Map<K, V> map : maps) {
            Preconditions.checkNotNull(map);
            outputMap.putAll(map);
        }

        return outputMap;
    }
}
